<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32 HTTPS Server: httpsserver::WebsocketInputStreambuf Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP32 HTTPS Server
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classhttpsserver_1_1WebsocketInputStreambuf.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classhttpsserver_1_1WebsocketInputStreambuf-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">httpsserver::WebsocketInputStreambuf Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for httpsserver::WebsocketInputStreambuf:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1WebsocketInputStreambuf__inherit__graph.png" border="0" usemap="#httpsserver_1_1WebsocketInputStreambuf_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for httpsserver::WebsocketInputStreambuf:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1WebsocketInputStreambuf__coll__graph.png" border="0" usemap="#httpsserver_1_1WebsocketInputStreambuf_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abc60fb8527fb0b4b348b4fdad94643ed"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1WebsocketInputStreambuf.html#abc60fb8527fb0b4b348b4fdad94643ed">WebsocketInputStreambuf</a> (<a class="el" href="classhttpsserver_1_1ConnectionContext.html">ConnectionContext</a> *con, size_t dataLength, uint8_t *_=nullptr, size_t bufferSize=2048)</td></tr>
<tr class="memdesc:abc60fb8527fb0b4b348b4fdad94643ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a Web Socket input record streambuf.  <a href="#abc60fb8527fb0b4b348b4fdad94643ed">More...</a><br /></td></tr>
<tr class="separator:abc60fb8527fb0b4b348b4fdad94643ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41aa03bbcd0c95a34ee06107ff2dc3c4"><td class="memItemLeft" align="right" valign="top"><a id="a41aa03bbcd0c95a34ee06107ff2dc3c4"></a>
int_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1WebsocketInputStreambuf.html#a41aa03bbcd0c95a34ee06107ff2dc3c4">underflow</a> ()</td></tr>
<tr class="memdesc:a41aa03bbcd0c95a34ee06107ff2dc3c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle the request to read data from the stream but we need more data from the source. <br /></td></tr>
<tr class="separator:a41aa03bbcd0c95a34ee06107ff2dc3c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7873057efc443e33e210d09cca03565c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1WebsocketInputStreambuf.html#a7873057efc443e33e210d09cca03565c">discard</a> ()</td></tr>
<tr class="memdesc:a7873057efc443e33e210d09cca03565c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Discard data for the record that has not yet been read.  <a href="#a7873057efc443e33e210d09cca03565c">More...</a><br /></td></tr>
<tr class="separator:a7873057efc443e33e210d09cca03565c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b7a3ded5abf4567a68d312ccc3c3c48"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1WebsocketInputStreambuf.html#a4b7a3ded5abf4567a68d312ccc3c3c48">getRecordSize</a> ()</td></tr>
<tr class="memdesc:a4b7a3ded5abf4567a68d312ccc3c3c48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the expected record.  <a href="#a4b7a3ded5abf4567a68d312ccc3c3c48">More...</a><br /></td></tr>
<tr class="separator:a4b7a3ded5abf4567a68d312ccc3c3c48"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="abc60fb8527fb0b4b348b4fdad94643ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc60fb8527fb0b4b348b4fdad94643ed">&#9670;&nbsp;</a></span>WebsocketInputStreambuf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">httpsserver::WebsocketInputStreambuf::WebsocketInputStreambuf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhttpsserver_1_1ConnectionContext.html">ConnectionContext</a> *&#160;</td>
          <td class="paramname"><em>con</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>dataLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>pMask</em> = <code>nullptr</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufferSize</em> = <code>2048</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a Web Socket input record streambuf. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">socket</td><td>The socket we will be reading from. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dataLength</td><td>The size of a record. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferSize</td><td>The size of the buffer we wish to allocate to hold data. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a7873057efc443e33e210d09cca03565c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7873057efc443e33e210d09cca03565c">&#9670;&nbsp;</a></span>discard()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void httpsserver::WebsocketInputStreambuf::discard </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Discard data for the record that has not yet been read. </p>
<p>We are working on a logical fixed length record in a socket stream. This means that we know in advance how big the record should be. If we have read some data from the stream and no longer wish to consume any further, we have to discard the remaining bytes in the stream before we can get to process the next record. This function discards the remainder of the data.</p>
<p>For example, if our record size is 1000 bytes and we have read 700 bytes and determine that we no longer need to continue, we can't just stop. There are still 300 bytes in the socket stream that need to be consumed/discarded before we can move on to the next record. </p>

</div>
</div>
<a id="a4b7a3ded5abf4567a68d312ccc3c3c48"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b7a3ded5abf4567a68d312ccc3c3c48">&#9670;&nbsp;</a></span>getRecordSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t httpsserver::WebsocketInputStreambuf::getRecordSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the size of the expected record. </p>
<dl class="section return"><dt>Returns</dt><dd>The size of the expected record. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/<a class="el" href="WebsocketInputStreambuf_8hpp_source.html">WebsocketInputStreambuf.hpp</a></li>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/WebsocketInputStreambuf.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacehttpsserver.html">httpsserver</a></li><li class="navelem"><a class="el" href="classhttpsserver_1_1WebsocketInputStreambuf.html">WebsocketInputStreambuf</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
